﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// des:整型的静态拓展	
/// </summary>
public static class IntExtension 
{
    public static bool Contains(this int number, params int[] var)
    {
        for (int i = 0; i < var.Length; i++)
        {
            if (number==var[i])
            {
                return true;
            }
        }
        return false;
    }

    public static string ToTime(this int time)
    {
        //float time = Time.realtimeSinceStartup - enterMapTime;
        var hour = (int)time / 3600;
        var minute = ((int)time - hour * 3600) / 60;
        var second = (int)time - hour * 3600 - minute * 60;

        return string.Format("{0:D2}:{1:D2}:{2:D2}", hour, minute, second);

    }

   
}
